import request from '@/utils/request'

// 批次列表（分页）
export function pagePrintBatch(query) {
  return request({
    url: '/order/projectOrderPrintBatch/paging',
    method: 'get',
    params: query
  })
}

// 获取企业批次列表
export function listByEnterpriseId(query) {
  return request({
    url: '/order/projectOrderPrintBatch/listByEnterpriseId',
    method: 'get',
    params: query
  })
}

// 根据订单id查询可以加入批次的订单
export function listOrderFromBaseByOrderIds(data) {
  return request({
    url: '/order/projectOrderPrintBatch/listOrderFromBaseByOrderIds',
    method: 'post',
    data: data
  })
}

// 保存批次
export function savePrintBatch(data) {
  return request({
    url: '/order/projectOrderPrintBatch/save',
    method: 'post',
    data: data
  })
}

// 根据批次id确认发货
export function doDeliveryByBatchId(query) {
  return request({
    url: '/order/projectOrderPrintBatch/doDeliveryByBatchId',
    method: 'get',
    params: query
  })
}

// 删除批次
export function deleteById(data) {
  return request({
    url: '/order/projectOrderPrintBatch/delete',
    method: 'post',
    data: data
  })
}

// 批量删除批次
export function batchDeleteByIds(data) {
  return request({
    url: '/order/projectOrderPrintBatch/batchDelete',
    method: 'post',
    data: data
  })
}
